<html {$html_attrs}>
<head>
<title>rel_propostaorcamentaria</title>
{BEGIN stylesheetlink}
<link REL="stylesheet" href="include/style.css" type="text/css">
<!--[if IE]>
<link REL="stylesheet" href="include/styleIE.css" type="text/css">
<![endif]-->
{END stylesheetlink}
<style>
.grid_block {  
margin-top:5px;
border-collapse: collapse;
align:center;
width:95%;
border: solid black 1px;
} 
.grid_block td { 
 padding: 5px; 
 margin: 0px; 
 border: solid #cccccc 1px;
}
.grid_block .gridspacing {width:20px;border-top-color:white; border-bottom-color:white;background-color:white}
@media print 
{
	a.pdf {display:none}
}
.printpage {page-break-after:always}
.pagesummary
{
background-color:#ffffbb;
}
.globalsummary
{
background-color:#ffe0b0;
}

{$cssdata}

.group_1
{
background-color: #F0FFF0;
}
.group_2
{
background-color: #E8F8FF;
}


.nbgroup_1
{
background-color: #F0FFF0;
border-style:none;
}
.nbgroup_2
{
background-color: #E8F8FF;
border-style:none;
}


.header_1
{
background-color: #CCD8CC;
}
.header_2
{
background-color: #C5D2D8;
}

</style> 
</head>
<body topmargin=5 style="background:white">
{BEGIN body}
{$header}
{BEGIN page}
<div>

<h1>rel_propostaorcamentaria</h1>

{BEGIN pdf_block}
{BEGIN pdflink_block}
<a href=# class=pdf {$pdflink_attrs}><img src="images/bt_pdf.gif" border="0"></a>
{END pdflink_block}
{END pdf_block}

{BEGIN grid_block}
<table align="center" cellpadding=5 class="grid_block">
{BEGIN grid_row}
<!-------------------------------------  group headers ----------------------------------------->
{BEGIN ano_newgroup}
<tr>
<td class=header_1 colspan=11>
Ano:&nbsp;
<font style="font-weight:900">{$ano_grval}</font></td>
</tr>
{END ano_newgroup}
{BEGIN tipo_despesa_newgroup}
<tr>
<td class=group_1>&nbsp;</td>
<td class=header_2 colspan=10>
Tipo Despesa:&nbsp;
<font style="font-weight:900">{$tipo_despesa_grval}</font></td>
</tr>
<tr>
<td class=group_1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td class=group_2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td class=blackshade><b>Sub Componente</b></td>
<td class=blackshade><b>Contra Partida Contabil</b></td>
<td class=blackshade><b>Contra Partida Nao Contabil</b></td>
<td class=blackshade><b>Componente</b></td>
<td class=blackshade><b>Total Contrapartida</b></td>
<td class=blackshade><b>Kfw Fundo Disposicao</b></td>
<td class=blackshade><b>Kfw Contrato Consultoria</b></td>
<td class=blackshade><b>Total Kfw</b></td>
<td class=blackshade><b>Total Orcado</b></td>
</tr>
{END tipo_despesa_newgroup}
<!-------------------------------------  data ----------------------------------------->
{BEGIN row_data}
<tr>
			<td class=group_1>&nbsp;</td>
			<td class=group_2>&nbsp;</td>
	<td class=data>{$sub_componente_value}</td>
	<td class=data>{$contra_partida_contabil_value}</td>
	<td class=data>{$contra_partida_nao_contabil_value}</td>
	<td class=data>{$componente_value}</td>
	<td class=data>{$total_contrapartida_value}</td>
	<td class=data>{$kfw_fundo_disposicao_value}</td>
	<td class=data>{$kfw_contrato_consultoria_value}</td>
	<td class=data>{$total_kfw_value}</td>
	<td class=data>{$total_orcado_value}</td>
</tr>
{END row_data}
<!-------------------------------------  group summary ----------------------------------------->
{BEGIN tipo_despesa_endgroup}
<tr>
	<td class=group_1>&nbsp;</td>
	<td 1 class=group_2
		colspan=10 >
	Resumo para Tipo Despesa {$tipo_despesa_grval}
	 - {$grouptipo_despesa_total_cnt} Total de registros</div></td>
</tr>
<!--  Sum -->
<tr>
			<td class=group_1>&nbsp;</td>
			<td class=group_2
		>Soma</td>
			<td class=group_2
		>&nbsp;</td>
			<td class=group_2
		>{$grouptipo_despesa_totalcontra_partida_contabil_sum}</td>
			<td class=group_2
		>{$grouptipo_despesa_totalcontra_partida_nao_contabil_sum}</td>
			<td class=group_2
		>&nbsp;</td>
			<td class=group_2
		>{$grouptipo_despesa_totaltotal_contrapartida_sum}</td>
			<td class=group_2
		>{$grouptipo_despesa_totalkfw_fundo_disposicao_sum}</td>
			<td class=group_2
		>{$grouptipo_despesa_totalkfw_contrato_consultoria_sum}</td>
			<td class=group_2
		>{$grouptipo_despesa_totaltotal_kfw_sum}</td>
			<td class=group_2
		>{$grouptipo_despesa_totaltotal_orcado_sum}</td>
</tr>	
{END tipo_despesa_endgroup}
{BEGIN ano_endgroup}
<tr>
	<td 1 class=group_1
		colspan=11 >
	Resumo para Ano {$ano_grval}
	 - {$groupano_total_cnt} Total de registros</div></td>
</tr>
<!--  Sum -->
<tr>
			<td class=group_1
		style="border-bottom: solid black 2px"
	>Soma</td>
			<td class=group_1
		style="border-bottom: solid black 2px"
	>&nbsp;</td>
			<td class=group_1
		style="border-bottom: solid black 2px"
	>&nbsp;</td>
			<td class=group_1
		style="border-bottom: solid black 2px"
	>{$groupano_totalcontra_partida_contabil_sum}</td>
			<td class=group_1
		style="border-bottom: solid black 2px"
	>{$groupano_totalcontra_partida_nao_contabil_sum}</td>
			<td class=group_1
		style="border-bottom: solid black 2px"
	>&nbsp;</td>
			<td class=group_1
		style="border-bottom: solid black 2px"
	>{$groupano_totaltotal_contrapartida_sum}</td>
			<td class=group_1
		style="border-bottom: solid black 2px"
	>{$groupano_totalkfw_fundo_disposicao_sum}</td>
			<td class=group_1
		style="border-bottom: solid black 2px"
	>{$groupano_totalkfw_contrato_consultoria_sum}</td>
			<td class=group_1
		style="border-bottom: solid black 2px"
	>{$groupano_totaltotal_kfw_sum}</td>
			<td class=group_1
		style="border-bottom: solid black 2px"
	>{$groupano_totaltotal_orcado_sum}</td>
</tr>	
{END ano_endgroup}
{END grid_row}
{BEGIN global_summary}
<!--------------------------------------global summary-------------------------------------------->
<tr>
	<td class=globalsummary style="border-top: solid black 2px" colspan=11>Resumo Global 
	 {$global_total_cnt} - Total de registros</td>
</tr>
<!--  Sum -->
<tr>
	<td class=globalsummary>
			Soma&nbsp;
			&nbsp;
	</td>
	<td class=globalsummary>
					&nbsp;
	</td>
	<td class=globalsummary>
					&nbsp;
	</td>
	<td class=globalsummary>
					{$global_totalcontra_partida_contabil_sum}
	</td>
	<td class=globalsummary>
					{$global_totalcontra_partida_nao_contabil_sum}
	</td>
	<td class=globalsummary>
					&nbsp;
	</td>
	<td class=globalsummary>
					{$global_totaltotal_contrapartida_sum}
	</td>
	<td class=globalsummary>
					{$global_totalkfw_fundo_disposicao_sum}
	</td>
	<td class=globalsummary>
					{$global_totalkfw_contrato_consultoria_sum}
	</td>
	<td class=globalsummary>
					{$global_totaltotal_kfw_sum}
	</td>
	<td class=globalsummary>
					{$global_totaltotal_orcado_sum}
	</td>
</tr>	
{END global_summary}
</table>
{END grid_block}
</div>
{END page}
{$footer}
{END body}
</body>
</html>